<template>
	<div class="app-container">
		<BaseTable :columns="columns" :dataList="dataList">
			<template #projectName="{ row }">
				<span style="cursor: pointer; color: #409eff" @click="toDetail(row.projectId)">{{ row.projectName }}</span>
			</template>
		</BaseTable>
	</div>
</template>
<script setup>
import { reactive } from 'vue'
import BaseTable from '@/components/BaseTable'
import { gclogs } from '@/api/board/index'
import useUserStore from '@/store/modules/user'
import { useRoute } from 'vue-router'
const route = useRoute()
const userStore = useUserStore()

const { proxy } = getCurrentInstance()
const { problem_status } = proxy.useDict('problem_status')
const router = useRouter()

const columns = ref([
	{ key: 1, label: `客户名称`, prop: 'customerName', type: 'text', visible: true },
	{ key: 2, width: '150', label: `项目名称`, prop: 'projectName', type: 'custom', visible: true },
	{ key: 3, width: '150', label: `工程日志数量`, prop: 'logCount', type: 'text', visible: true },
	{ key: 4, width: '150', label: `项目更新时间`, prop: 'updateTime', type: 'dateTime', visible: true }
])
const total = ref(0)
const dataList = ref([])
const queryData = reactive({
	createUserCode: route.query.createUserCode
})
const search = () => {
	gclogs(queryData).then((res) => {
		dataList.value = res.data
	})
}
search()
const address = ref()
const reset = () => {
	search()
}

const toDetail = (id) => {
	router.push({
		path: '/project/projectDetail',
		query: { id: id }
	})
}
</script>
<style lang="scss" scoped>
.left-label {
	color: #33b6fe;
	height: 24px;
	line-height: 24px;
	position: relative;
	top: 1px;
	margin-right: 10px;
	display: inline-block;
	min-width: 80px;
}
:deep(.el-table__header) {
	background-color: #2f3f56;
}

.row3 {
	border-bottom: 1px rgba(240, 240, 240, 1) solid;
	padding: 5px 0 10px 0;
}
</style>
